package com.quick.controller;

import com.quick.service.QuartzService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @ClassName QuartzController
 * @Description TODO
 * @Author wangxin332
 * @Date 2018/10/1 下午9:19
 * @Version 1.0
 **/
@RestController
public class QuartzController {
	@Autowired
	private QuartzService quartzService;

	@GetMapping("pauseJob")
	public String pauseJob(){
		quartzService.pauseJob("testQuartzDetail");
		return "暂停一个定时器任务，请注意观察控制台";
	}

	@GetMapping("start")
	public String start(){
		quartzService.startJob("testQuartzDetail");
		return "开启一个定时器任务，请注意观察控制台";
	}

}
